package cn.zysoft.his4killsession.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class LoadPropertiesUtil {
	//读取resource下properties文件
	public static String readProp(String filename, String key) {
		String value = null;
		InputStream in = LoadPropertiesUtil.class.getClassLoader().getResourceAsStream(filename);
		Properties prop = new Properties();
		try {
			prop.load(in);
			value = prop.getProperty(key);
		} catch (IOException e) {
			e.printStackTrace();
		}
		return value;
	}
}
